Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue when days-before-close is more than days-before-stale #775

Merged
merged 1 commit into from
Jul 25, 2022

Conversation

luketomlinson
Copy link
Collaborator

Changes

When we introduced #717, we inadvertently introduced a bug that would occur when days-before-close > days-before-stale.

Example:

days-before-stale: 0 and days-before-close: 30

Every issue should be stale in this scenario and the stale label would be applied as expected. The problem was is that the action would look back 30 days and ALWAYS see an update and immediately remove the stale label.

My changes change the logic that can potentially "un-stale" an issue. Rather than check for an update in the last days-before-close days (e.g. 30), I check if the update occurred AFTER the stale date. This is subtle, but caused big issues for actions when days-before-close > days-before-stale

Context

fixes #774

@luketomlinson luketomlinson requested a review from a team as a code owner July 15, 2022 20:36
Copy link

@benwells benwells left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Action keep removing stale label and adding stale label
3 participants